import TabsView from '@/layouts/tabs/TabsView'
import BlankView from '@/layouts/BlankView'
import PageView from '@/layouts/PageView'

// 路由配置
const options = {
  routes: [{
    path: '/login',
    name: '登录页',
    component: () =>
      import('@/pages/login')
  },
  {
    path: '*',
    name: '404',
    component: () =>
      import('@/pages/exception/404'),
  },
  {
    path: '/403',
    name: '403',
    component: () =>
      import('@/pages/exception/403'),
  },
  {
    path: '/',
    name: '首页',
    component: TabsView,
    redirect: '/login',
    children: [{
      path: 'dashboard',
      name: 'Dashboard',
      meta: {
        icon: 'dashboard'
      },
      component: () =>
        import('@/views/dashboard/index'),
    },

    {
      path: 'orders',
      name: '订单管理',
      meta: {
        icon: 'shopping'
      },
      component: PageView,
      children: [{
        path: 'buy',
        name: '买入订单',
        component: () =>
          import('@/views/buy')
      },
      {
        path: 'sell',
        name: '卖出订单',
        component: () =>
          import('@/views/sell')
      },
      ]
    },
    {
      path: 'balance',
      name: '财务管理',
      meta: {
        icon: 'account-book'
      },
      component: PageView,
      children: [{
        path: 'details',
        name: '账变明细',
        component: () =>
          import('@/views/balance/index')
      },
      {
        path: 'report',
        name: '数据报表',
        component: () =>
          import('@/views/balance/index')
      },
      ]
    },
    {
      path: 'manual',
      name: '人工出币',
      meta: {
        icon: 'transaction'
      },
      component: PageView,
      children: [{
        path: 'out',
        name: '手动出币',
        component: () =>
          import('@/views/manual/out')
      },
      {
        path: 'agencys',
        name: 'SDK接口出单',
        component: () =>
          import('@/views/manual/sdk')
      },
      ]
    },
    {
      path: 'coins',
      name: '买币',
      meta: {
        icon: 'money-collect'
      },
      component: () =>
        import('@/views/coins')
    },
    {
      path: 'config',
      name: '设置',
      meta: {
        icon: 'control'
      },
      component: PageView,
      children: [{
        path: 'password',
        name: '登录密码',
        component: () =>
          import('@/views/password/reset')
      },
      {
        path: 'security',
        name: '安全密码',
        component: () =>
          import('@/views/password/security')
      },
      // {
      //     path: 'agencys',
      //     name: '谷歌验证器',
      //     component: () =>
      //         import ('@/views/agency-account')
      // },
      {
        path: 'sub-account',
        name: '子账户',
        component: () =>
          import('@/views/sub-account'),
        meta: {
          addBtn: false
        }
      },
      ]
    },
    {
      path: '/profile',
      name: '商户中心',
      meta: {
        icon: 'shop'
      },
      component: () =>
        import('@/views/profile/index.vue')
    },
    ]
  },
  ]
}

export default options